from django.shortcuts import render
from rest_framework.views import APIView
from rest_framework.response import Response
from . import serializers
from .models import *
# Create your views here.


class Index(APIView):
    def get(self,request):
        goods = Goods.objects.all()
        good = serializers.Goods_serializers(instance=goods,many=True)
        data = {
            'good':good.data
        }
        return Response(data)








